<template>
	<div v-if="item">
		<video
			:src="item.attrs.src"
			:controls="item.attrs.controls"
			:style="
				item.attrs.style +
				(item.attrs.width ? ';width:' + item.attrs.width : '') +
				(item.attrs.height ? 'height:' + item.attrs.height : '')
			"
		/>
	</div>
</template>

<script>
	export default {
		props: {
			/**
			 * 内容
			 */
			item: {
				type: Object,
				default: null,
			},
		},
	};
</script>

<style lang="scss" scoped>
	video {
		margin-bottom: 20rpx;
	}
</style>
